<?
//impostazioni del modulo news
include("includes/config.inc.php");
include("includes/auth.lib.php");
include("includes/keywords.class.php");
// include Editor Start
include("FCKeditor/fckeditor.php");
// include Editor Ende
$module="KEYWORDS";
switch($lang) {
  case "ita":
	$currentlang = " - ITA";
  break;

  case "eng":
	$currentlang = " - ENG";
  break;

  case "fra":
	$currentlang = " - FRA";
  break;

  case "esp":
	$currentlang = " - ESP";
  break;
  
  case "ger":
	$currentlang = " - GER";
  break;

}
$javascript = "function control_news()  {
   if(document.insertnews.titolo.value==\"\")  {
     alert('Devi inserire almeno il titolo!');
     return false;
   }
}
";
   list($status, $user) = auth_get_status();
   switch($status){
       case AUTH_LOGGED:
        $result1 = @mysql_query("SELECT nome,stato FROM utenti WHERE id='$id_user';");
        list($username,$level) = mysql_fetch_row($result1);
            //recupero i dati in post
                $op = $_GET['op'];
                if(!isset($op) && $op=="")
                 $op = $_POST['op'];
                $num_per_page = 10;
                $id = $_GET['id'];
                if(!isset($id) || $id=="")
                 $id = $_POST['id'];
			    $menusx = "<table width=200 cellpadding=3>
							<tr>
							  <td valign=middle width=30 height=30><a class=menusx href=keywords.php?op=all><img src=\"imgs/ico_list.gif\" width=30 height=30 alt=\"Elenco keywords\" border=0></a></td><td align=left valign=middle><a class=menusx href=keywords.php?op=all>Elenco keywords</a></td>
							</tr>
							<tr>
							  <td valign=middle width=30 height=30><a class=menusx href=keywords.php?op=all&sezione=piscine><img src=\"imgs/ico_list.gif\" width=30 height=30 alt=\"Elenco keywords\" border=0></a></td><td align=left valign=middle><a class=menusx href=keywords.php?op=all&sezione=piscine>Elenco keywords Piscine</a></td>
							</tr>
							<tr>
							  <td valign=middle width=30 height=30><a class=menusx href=keywords.php?op=all&sezione=giardino><img src=\"imgs/ico_list.gif\" width=30 height=30 alt=\"Elenco keywords\" border=0></a></td><td align=left valign=middle><a class=menusx href=keywords.php?op=all&sezione=giardino>Elenco keywords Giardino</a></td>
							</tr>
							<tr>
							  <td valign=middle width=30 height=30><a class=menusx href=keywords.php?op=all&sezione=casa><img src=\"imgs/ico_list.gif\" width=30 height=30 alt=\"Elenco keywords\" border=0></a></td><td align=left valign=middle><a class=menusx href=keywords.php?op=all&sezione=casa>Elenco keywords Casa</a></td>
							</tr>
							<tr>
							  <td valign=middle width=30 height=30><a class=menusx href=keywords.php?op=all&sezione=fitness><img src=\"imgs/ico_list.gif\" width=30 height=30 alt=\"Elenco keywords\" border=0></a></td><td align=left valign=middle><a class=menusx href=keywords.php?op=all&sezione=fitness>Elenco keywords Fitness</a></td>
							</tr>
							<tr>
							  <td valign=middle width=30 height=30><a class=menusx href=keywords.php?op=add><img src=\"imgs/ico_add.gif\" width=30 height=30 alt=\"Aggiungi keywords\" border=0></a></td><td align=left valign=middle><a class=menusx href=keywords.php?op=add>Aggiungi keywords</a></td>
							</tr>
							<tr>
							 <td colspan=2>&nbsp;</td>
							</tr>
							<tr>
							 <td colspan=2>&nbsp;</td>
							</tr>
							<tr>
							 <td colspan=2>&nbsp;</td>
							</tr>
							<tr>
							  <td valign=middle width=30 height=30><a class=menusx href=gestione.php><img src=\"imgs/ico_back.gif\" width=30 height=30 alt=Principale border=0></a></td><td align=left valign=middle><a class=menusx href=gestione.php>Torna alla pagina principale</a></td>
							</tr>
							</table>";

#############################################opzioni possibili##################################

            switch ($op)  {
			  
			  case "all":
			  //recupero dati in GET
			  			$sezione = $_GET['sezione'];
						if($sezione!="")
						  $qry_sezione = "AND sezione='$sezione'";
			            $min = $_GET['min'];
                        $max = $_GET['max'];
                        $page = $_GET['page'];
                     if (!isset($min))
                      $min= 0;
                     if (!isset($max))
                      $max = 30;
                     if (!isset($page))
                      $page = 1;
               $qry_tot = "SELECT id FROM keywords WHERE lang='$lang' $qry_sezione;";
               $result_tot = @mysql_query($qry_tot);
               $qry = "SELECT id,titolo,attivo,sezione FROM keywords WHERE lang='$lang' $qry_sezione ORDER BY titolo ASC LIMIT $min,$max;";
               $result = @mysql_query($qry);
               $num_news = @mysql_num_rows($result_tot);
                 $content = "<table class=\"content\" width=\"100%\" align=\"center\" cellpadding=\"3\" cellspacing=\"0\">\n"
                 ."<tr><td class=\"tbtit\" align=\"\" width=\"70%\"><b>Titolo</b></td>
				 <td class=\"tbtit\" align=\"center\" width=\"20%\"><b>Sezione</b></td>
				 <td class=\"tbtit\" align=\"center\" width=\"10%\"><b>Azioni</b></td></tr>\n";
               while (list($idv, $titolo, $attivo, $sezionec) = @mysql_fetch_row($result))  {
				   if($attivo == "y")
				    $semaforo = "<a href=\"keywords.php?op=disactive&id=$idv\"><img src=\"imgs/ico_green.jpg\" border=0 alt=Disattiva></a>";
				   else
				    $semaforo = "<a href=\"keywords.php?op=active&id=$idv\"><img src=\"imgs/ico_red.jpg\" border=0 alt=Attiva></a>";				    	   				 
                 $data = "$g-$m-$a";
                 $content .= "<tr><td class=\"tdnews\">&nbsp;$titolo</td>
				 <td class=\"tdnews\" align=\"center\">&nbsp;$sezionec</td>";
                 $content .= "<td class=\"tdnews\" align=\"center\" valign=\"middle\"><a href=\"keywords.php?op=mod&id=$idv\"><img src=\"imgs/ico_edit.gif\" alt=\"modifica\" width=16 height=16 title=\"modifica\" border=\"0\"></a>&nbsp;&nbsp;
                  <a href=\"keywords.php?op=delete&id=$idv\" onclick='return confirm(\"Sei sicuro di voler eliminare questa keyword?\")'><img src=\"imgs/ico_delete.gif\" width=16 height=16 alt=\"cancella\" title=\"cancella\" border=\"0\"></a>&nbsp;&nbsp;
				  $semaforo";
                 $content .= "</a></td></tr>\n";
               }
               //$content .= "</table>\n";
               //inizio paginazione
                     $content .= "<tr><td colspan=3><table class=\"tbtit\" width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n";
                     $num_pages = ($num_news/$num_per_page) + 1;
                     $resto =  $num_news%$num_per_page;
                     if ($resto==0)
                      $num_pages--;
                     $content .= "<tr><td align=\"left\">";
                     if ($min!=0)   {
                      $min1 = $min-10;
                      $max1 = $max-10;
                      if ($page!=1)
                       $page1 = $page-1;;
                      $content .= "<a href=\"keywords.php?op=all&min=$min1&max=$num_per_page&page=$page1\"><img src=\"imgs/precedente.gif\" border=\"0\" alt=\"precedente\"></a>&nbsp;&nbsp;&nbsp;";
                      }
                      $content .= "</td><td align=\"center\">";
                     for ($i=1;$i<=$num_pages;$i++)  {
                       if ($page!=$i)  {
                        $max1 = $i*$num_per_page;
                        $min1 = $max1 - $num_per_page;
                        $content .= "<a href=\"keywords.php?op=all&min=$min1&max=$num_per_page&page=$i\"><b>$i</b></a>";
                        $content .= "  ";
                       }  else
                         $content .= "  $i  ";
                     }
                     $content .= "</td><td align=\"right\">";
                     $diff2 = $num_news - ($num_per_page*$page);
                     if ($diff2 > 0)   {
                      $min1 = $min + $num_per_page;
                      $max1 = $max + $num_per_page;
                      $page1 = $page + 1;
                      $content .= "&nbsp;&nbsp;&nbsp;<a href=\"keywords.php?op=all&min=$min1&max=$num_per_page&page=$page1\"><img src=\"imgs/successivo.gif\" border=\"0\" alt=\"successivo\"></a>";
                     }
                     $content .= "</td></tr></table>\n";
					 $content .= "</td></tr></table>\n";
			  break;	

              case "save":
               $newKey = new keywords();
               $error = $newKey->save($_POST);
			   if ($error == "0")  {
			    header("Location:keywords.php?op=all");
				die();
			   }  else  {
			    $content = $error;
			   }
              break;

              case "mod":
               $newKey = new keywords($id);
				$content = "<table width=100% cellpadding=3 cellspacing=0 class=content>";
                $content .= "<tr><td align=\"center\" class=tbtit><b>Modifica keyword</b></td></tr>";
                $content .= "<tr><td><table width=\"100%\" class=\"content\" border=\"0\">"
                ."<form name=\"update\" action=\"keywords.php\" method=\"POST\">\n";
                $content .= "<tr><td><table width=\"100%\" class=\"content\" border=\"0\">"
                ."<tr><td>Titolo:<br><input type=\"text\" name=\"titolo\" size=\"60\" value=\"".$newKey->fields['titolo']."\" /></td></tr></table></td></tr>";
                $content .= "<tr><td><table width=\"100%\" class=\"content\" border=\"0\">"
                ."<tr><td>Testo:<br>";
		 //start editor
		$oFCKeditor = new FCKeditor('testo');
		$oFCKeditor->Value = "".$newKey->fields['testo']."";
		$content .= $oFCKeditor->Create(); 
		 $content .= "</td></tr></table></td></tr>\n";
				$content .= "<tr><td><table width=\"100%\" class=\"content\" border=\"0\">"
                ."<tr><td>Description (max. 3 righe di testo):<br>
				<textarea name=description cols=100 rows=10>".$newKey->fields['description']."</textarea>
				</td></tr></table></td></tr>\n";
                $content .= "<tr><td><table width=\"100%\" class=\"content\" border=\"0\">"
                ."<tr><td align=\"center\">
				<input type=\"hidden\" name=\"op\" value=\"update\" /><input type=\"hidden\" name=\"id\" value=\"".$newKey->fields['id']."\" />\n
                <input type=\"image\" src=\"imgs/ico_save.gif\" title=\"Aggiorna\">&nbsp;&nbsp;<a class=content href=\"javascript:document.update.submit();\">Salva</a> - <a href=\"javascript:document.update.reset();\"><img src=\"imgs/reset.gif\" alt=\"Reset\" border=0/>&nbsp;&nbsp;Annulla modifiche</a></td></tr></table></td></tr></form>\n";
                $content .= "</table>
				</td></tr></table>";
              break;

              case "update":
               $newKey = new keywords($id);
               $content = printError($newKey->update($_POST));
              break;

			  case "active":
                $newKey = new keywords($id);
				$error = $newKey->active();
				if($error == "0") {
				 header("Location:keywords.php?op=all");
				 die();
				} else  {
				  $content = $error;
				} 
			  break;
			  
			  case "disactive":
                $newKey = new keywords($id);
				$error = $newKey->disactive();
				if($error == "0") {
				 header("Location:keywords.php?op=all");
				 die();
				} else  {
				  $content = $error;
				} 
			  break;
			  
              case "delete":
               $newKey = new keywords($id);
               $error = $newKey->delete();
			   if ($error == "0")  {
			    header("Location:keywords.php?op=all");
				die();
			   }  else  {
			       $content = $error;
			   }
              break;

              case "add":
				   $content = "<table width=100% cellpadding=3 cellspacing=0 class=content>";
                   $content .= "<tr><td align=\"center\" class=tbtit><b>Aggiungi Keyword</b></td></tr>";
                   $content .= "<tr><td><table width=\"100%\" class=content>"
                   ."<form name=\"insertnews\" action=\"keywords.php\" method=\"POST\">\n";
                   $content .= "<tr><td><table width=\"100%\" class=\"content\" border=\"0\">"
                ."<tr><td>Titolo:<br><input type=\"text\" name=\"titolo\" size=\"60\" /></td></tr></table></td></tr>".
				"<tr><td><table width=\"100%\" class=\"content\" border=\"0\">"
                ."<tr><td>Sezione:<br>
				<select name=\"sezionec\">
				<option value=\"piscine\">piscine</option>
				<option value=\"giardino\">giardino</option>
				<option value=\"casa\">casa</option>
				<option value=\"fintess\">fitness</option>
				</select>
				</td></tr></table></td></tr>";
                $content .= "<tr><td><table width=\"100%\" class=\"content\" border=\"0\">"
                ."<tr><td>Testo:<br>";
		 //start editor
		$oFCKeditor = new FCKeditor('testo');
		$oFCKeditor->Value = "";
		$content .= $oFCKeditor->Create(); 
		 $content .= "</td></tr></table></td></tr>\n";
				$content .= "<tr><td><table width=\"100%\" class=\"content\" border=\"0\">"
                ."<tr><td>Description (max. 3 righe di testo):<br>
				<textarea name=description cols=100 rows=10></textarea>
				</td></tr></table></td></tr>\n";
				   $content .="<tr><td align=center><table width=\"100%\" class=content>"
                   ."<tr><td align=center>
				   <input type=\"hidden\" name=\"op\" value=\"save\" />\n
                   <input type=\"image\" src=\"imgs/ico_save.gif\" title=\"Aggiungi\"/ >&nbsp;&nbsp;<a href=\"javascript:document.insertnews.submit();\" >Salva</a></td></tr></table></td></tr></form>\n";
				   $content .= "</table>
				   </td></tr></table>";
              break;
			  
			  default:
			   $content = "&nbsp;";
			  break;

              }

       break;

       case AUTH_NOT_LOGGED:
        header("Location:index.html");
		die();
       break;
}
?>
<html><!-- InstanceBegin template="/Templates/moduli.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Modulo Keywords</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<link href="style/style.css" rel="stylesheet" type="text/css">
<script type="text/JavaScript">
<!--
<?=$javascript?>

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  var dis;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) {
	   obj=obj.style; 
	   if(v == 'show')  {
	     v = 'visible';
		 dis = 'block';
	   }
	   if(v == 'hide')  {
	     v = 'hidden';
		 dis = 'none';	 
	   }
	 }  
    obj.visibility = v; 
	obj.display = dis;
	}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('imgs/icons/pag_web-b.gif','imgs/icons/info_utente-b.gif','imgs/icons/prodotti-b.gif','imgs/icons/newsletter-b.gif','imgs/icons/news-b.gif','imgs/icons/gest_banner-b.gif','imgs/icons/utenti-b.gif','imgs/icons/configurazione-b.gif','imgs/icons/kw-b.gif'); <?=$onload?>">
<!-- ImageReady Slices (gestione.psd - Slices: 02, 03, 04, 06, 07, 08, 09, 10, 11, 12) -->
<!-- End ImageReady Slices -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="40" height="177" background="imgs/bkgSx.gif">&nbsp;</td>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="552" background="imgs/gestione_02.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="360"><img src="imgs/spacer20.gif" width="360" height="73"></td>
            <td><table width="100%" height="73" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td height="5"><img src="imgs/spacer20.gif" width="45" height="5"></td>
              </tr>
              <tr>
                <td align="left" valign="middle" class="tit01"><!-- InstanceBeginEditable name="user" --><?=$username?><!-- InstanceEndEditable --></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
        <td background="imgs/gestione_03.gif">&nbsp;</td>
        <td width="221"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="imgs/gestione_04.gif" width="221" height="17" alt=""></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="57"><a href="gestione.php?logout=1"><img src="imgs/gestione_06.gif" alt="Logout" width="57" height="51" border="0"></a></td>
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><a href="mailto:info@media-tek.it"><img src="imgs/gestione_07.gif" alt="" width="164" height="25" border="0"></a></td>
                  </tr>
                  <tr>
                    <td><a href="#"><img src="imgs/gestione_08.gif" alt="" width="164" height="26" border="0"></a></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><img src="imgs/gestione_09.gif" width="221" height="5" alt=""></td>
          </tr>
        </table></td>
      </tr>
    </table>
      <table width="100%" height="104" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="678" background="imgs/gestione_10.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="203"><table width="203" height="104" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td><img src="imgs/spacer20.gif" width="203" height="65"></td>
                </tr>
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="45"><img src="imgs/spacer20.gif" width="45" height="39"></td>
                      <td><table width="100%" height="39" border="0" cellpadding="5" cellspacing="0">
                        <tr>
                          <td align="left" valign="middle" class="module"><!-- InstanceBeginEditable name="module" --><?=$module.$currentlang?><!-- InstanceEndEditable --></td>
                        </tr>
                      </table></td>
                    </tr>
                  </table></td>
                </tr>
              </table></td>
              <td><table width="475" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="50"><img src="imgs/spacer20.gif" width="50" height="104" alt=""></td>
                  <td align="left" valign="bottom">
				  <? if($level!="VBL")  { ?>
				  <table border="0" cellspacing="0" cellpadding="2"><tr><?
	if($level=="admin")  {
?><td width="58"><a href="gestione.php?module=config" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('config','','imgs/icons/configurazione-b.gif',1)"><img src="imgs/icons/configurazione.gif" alt="Configurazione applicazioni" name="config" width="58" height="69" border="0"></a></td><?
	}
	if($level=="admin")  {
?><td width="58"><a href="gestione.php?module=content" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('pages','','imgs/icons/pag_web-b.gif',1)"><img src="imgs/icons/pag_web.gif" alt="Pagine web" name="pages" width="58" height="69" border="0"></a></td><td width="58"><a href="gestione.php?module=newsletter" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Newsletter','','imgs/icons/newsletter-b.gif',1)"><img src="imgs/icons/newsletter.gif" alt="Newsletter" name="Newsletter" width="58" height="69" border="0"></a></td><?
	}
?>
<td width="58"><a href="gestione.php?module=news" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('News','','imgs/icons/news-b.gif',1)"><img src="imgs/icons/news.gif" alt="News" name="News" width="58" height="69" border="0"></a></td><?
	if($level=="admin")  {
?><td width="58"><a href="gestione.php?module=banner" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('banner','','imgs/icons/gest_banner-b.gif',1)"><img src="imgs/icons/gest_banner.gif" alt="Gestione Banner" name="banner" width="58" height="69" border="0"></a></td><?
	}
?><td width="58"><a href="gestione.php?module=prodotti"><img src="imgs/icons/prodotti.gif" alt="Pagine Web" name="pagine" width="58" height="69" border="0" id="pagine" onMouseOver="MM_swapImage('pagine','','imgs/icons/prodotti-b.gif',1)" onMouseOut="MM_swapImgRestore()"></a></td>
</tr></table>
<? } ?>
</td>
				</tr>
              </table></td>
            </tr>
          </table></td>
          <td valign="bottom" background="imgs/gestione_11.gif"><?
	if($level=="admin")  {
?><table cellpadding="2" cellspacing="0">
		    <tr>
			  <td width="58"><a href="gestione.php?module=keywords" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('keywords','','imgs/icons/kw-b.gif',1)"><img src="imgs/icons/kw.gif" alt="Gestione Keywords" name="keywords" width="58" height="69" border="0"></a></td>
			  <td width="58"><a href="gestione.php?module=webuser" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('webutente','','imgs/icons/utenti-b.gif',1)"><img src="imgs/icons/utenti.gif" name="webutente" width="58" height="69" border="0"></a></td>
			  <td width="58"><a href="gestione.php?module=user" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Utente','','imgs/icons/info_utente-b.gif',1)"><img src="imgs/icons/info_utente.gif" name="Utente" width="58" height="69" border="0"></a></td>
			  <td width="20" valign="middle">
				<table width="22" cellpadding="0" cellspacing="0">
				<tr>
				 <td width="22">
				  <a href="gestione.php?module=change_lang&newlang=eng"><img src="imgs/icons/ico-eng.jpg" alt="Inglese" width="20" height="20" border="0"></a></td>
				</tr>
				<tr>
				<td class="error" width="22" align="center" valign="middle"><a href="gestione.php?module=change_lang&newlang=ita"><img src="imgs/icons/ico-ita.jpg" alt="Italiano" width="20" height="20" border="0"></a></td>
				</tr>
			   </table>
			   </td>			  
			</tr>
		   </table><?
		   } else {
?>&nbsp;<?
}
		   ?></td>
          <td width="95"><img src="imgs/gestione_12.gif" width="95" height="104" alt=""></td>
        </tr>
      </table>
    </td>
    <td width="40" background="imgs/bkgDx.gif">&nbsp;</td>
  </tr>
  <tr>
    <td background="imgs/bkgSx.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F6F6F6"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="203" align="left" valign="top" bgcolor="#DFDFDF" class="menusx"><!-- InstanceBeginEditable name="menuSx" --><?=$menusx?><!-- InstanceEndEditable --></td>
        <td align="left" valign="top" bgcolor="#EFEFEF" class="content"><!-- InstanceBeginEditable name="content" --><?=$content?><!-- InstanceEndEditable --></td>
      </tr>
    </table>
      <table width="100%" height="50" border="0" cellpadding="5" cellspacing="0">
        <tr>
          <td background="imgs/gestione_03.gif" bgcolor="#F6F6F6" class="copy"><p>2006&copy; Gestione moduli dinamici - release 1.2 - Powered by Media-tek </p></td>
        </tr>
      </table></td>
    <td background="imgs/bkgDx.gif">&nbsp;</td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>